home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4503 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  950 b 

  1. Path: news.cencom.net!ns!tanp
  2. From: tanp@ns (Bill Wendling)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: ASCII value of a character
  5. Date: 5 Feb 1996 07:11:24 GMT
  6. Organization: Cen-Com Internet
  7. Message-ID: <4f4ais$4c2@news.cencom.net>
  8. References: <Pine.SUN.3.91.960202222737.26868B-100000@parsifal.nando.net> <4f0ov1$eca@nw002.infi.net>
  9. NNTP-Posting-Host: ns.cencom.net
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Greg DiGiorgio inexplicably wrote:
  13. } Pretzel,
  14.  
  15. } Here's some twisted logic for you...
  16.  
  17. } #include <stdio.h>
  18. } main () {
  19. }     char c;
  20. }     printf("Enter a character: ");
  21. }     scanf("%1c",c);
  22.  
  23. /*
  24. Uh....
  25.     scanf("%1c", &c);
  26. is what it should be.
  27. */
  28.  
  29. }     switch (c) {
  30. }         case 9: printf("You entered a TAB\n");
  31. }             break;
  32. }         default:break;
  33. }     }
  34. } }
  35.  
  36. } Greg DiGiorgio
  37.  
  38.  
  39. --
  40. Bill Wendling         | "Pinky, are you thinking what I'm thinking?"
  41. tanp@ns.cencom.net  | "I think so, Brain, but burlap chafes me so."
  42. "Boom Shanka"       | Finger me for my Geek Code...NOW!
  43.